Release 10.1A: OpenEdge Development:
Progress 4GL Reference


NEXT-VALUE function

Returns the next integer value of a static sequence, incremented by the positive or negative value defined in the Data Dictionary.

Syntax

NEXT-VALUE ( sequence [ , logical-dbname ] ) 

sequence

An identifier that specifies the name of a sequence defined in the Data Dictionary.

logical-dbname

An identifier that specifies the logical name of the database in which the sequence is defined. The database must be connected. If multiple databases are connected, you can omit this parameter if you specify a sequence that is unique to one of the databases.

Example

The following trigger procedure uses the Next-Item-Num sequence to set the item-num field for a new item record:

r-critem.p
TRIGGER PROCEDURE FOR Create OF Item.

/* Automatically assign a unique item number using Next-Item-Num seq */

ASSIGN Item.Item-Num = NEXT-VALUE(Next-Item-Num). 

Notes

See also

CURRENT-VALUE function, CURRENT-VALUE statement, DYNAMIC-CURRENT-VALUE function, DYNAMIC-CURRENT-VALUE statement, DYNAMIC-NEXT-VALUE function, NEXT-VALUE function


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095